.editor-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #646cff;
    text-decoration: none;
}

.nav-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.mode-switch {
    margin-right: 1rem;
}

.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.editor-panel {
    display: flex;
    flex-direction: column;
    border-right: none;
    overflow: hidden;
}

.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
}

/* 拖动分隔条样式 */
.resizer {
    background-color: #f5f5f5;
    cursor: col-resize;
    z-index: 10;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.resizer::after {
    content: "";
    position: absolute;
    width: 0.8rem;
    height: 1.3rem;
    background-color: hsl(253, 17%, 90%);
    border-radius: 2px;
}

.resizer::before {
    content: "⋮⋮";
    position: absolute;
    font-size: 20px;
    color: #817f7f;
    line-height: 0;
    z-index: 11;
    font-weight: bold;
}

.preview-settings-container {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.preview-settings-container.vertical {
    flex-direction: column;
}

.card-preview-section {
    flex: 1;
    padding: 1rem;
    overflow: auto;
}

.settings-panel {
    flex: 0.4;
    overflow: auto;
    height: 100%;
    border: 1px solid #e0e0e0;
}

.panel-header {
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #e0e0e0;
    background-color: #f9f9f9;
}

.vditor-container {
    flex: 1;
    overflow: auto;
}

.vditor-preview {
    display: none !important;
}


.card-preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.card-preview-container.vertical {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
}

.card-navigation {
    margin: 0 1rem;
}

.card-preview {
    position: relative;
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.card-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 1rem;
    box-sizing: border-box;
    overflow: hidden;
}

.overflow-allowed {
    overflow: auto;
    height: auto;
}

.overflow-hidden {
    overflow: hidden;
    height: 100%;
}

.card-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* 保持图片比例并完全适应容器 */
    height: auto;
    display: block;
    margin: 0 auto;
    /* 确保图片不会超出卡片边界 */
    box-sizing: border-box;
}

.empty-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-style: italic;
}

.settings-section {
    padding: 1rem;
}

.settings-section h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.size-settings,
.ratio-settings,
.split-settings {
    margin-bottom: 1.5rem;
}

.style-settings {
    margin-bottom: 1.5rem;
}

.style-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.style-card {
    padding: 0.5rem;
    border-radius: 8px;
    background-color: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.style-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.style-card.active {
    border-color: #646cff;
    background-color: #f0f7ff;
}

.card-title {
    text-align: center;
}

.card-preview {
    border-radius: 4px;
}

.size-input {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.unit-mode-switch {
    margin-bottom: 1rem;
}

.paper-size-select,
.scale-setting {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.2rem;
}

.scale-setting .el-slider {
    flex: 1;
    margin: 0 10px;
    font-size: 0.6rem;
}

.paper-ratio-select {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    gap: 0.2rem;
}

.paper-ratio-select-lable {
    min-width: 3rem;
}

.split-option {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.split-radio-group {
    display: flex;
    flex-wrap: wrap;
    min-width: 250px;
}

.split-radio-group :deep(.el-radio-button) {
    border-left: 1px solid var(--el-border-color);
}

.card-preview {
    box-sizing: border-box;
}

.fullscreen-preview {
    display: none;
    /* 默认隐藏 */
}

.fullscreen-mode {
    height: calc(100vh - 60px);
    /* 减去navbar的高度 */
}

.fullscreen-mode .preview-panel {
    flex: 1;
    width: 100%;
}

.fullscreen-mode .card-preview-section {
    padding: 2rem;
    justify-content: center;
    align-items: center;
}

.fullscreen-preview-panel {
    flex: 1;
    width: 100%;
}

.fullscreen-preview .card-preview-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border: none;
}

.fullscreen-cards-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
    width: 100%;
}

.fullscreen-cards-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
    /* 减去navbar和其他控件的高度 */
    width: 100%;
}

.fullscreen-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

.fullscreen-card {
    overflow: hidden;
    padding: 2rem;
    border-radius: 8px;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fullscreen-card .card-content {
    transform: scale(0.98);
}

.paper-size-select-lable {
    min-width: 5rem;
}

@media (prefers-color-scheme: dark) {

    .navbar,
    .panel-header {
        background-color: #2a2a2a;
        border-color: #3a3a3a;
    }

    .editor-panel,
    .preview-panel {
        border-color: #3a3a3a;
    }

    .settings-section h3 {
        color: #e0e0e0;
    }

    button[data-mode="wysiwyg"] {
        display: none !important;
    }
}